package com.wlstudy.leyou.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.sql.DataSource;

@Controller
public class HelloController {
    
    @Autowired
    private DataSource dataSource;

    @RequestMapping("hello")
    @ResponseBody
    public String hello() {
        return "Hello this springboot Demo";
    }

    @RequestMapping("datasource")
    @ResponseBody
    public String datasource() {
        return dataSource.toString();
    }
}
